

    <div class="content">
        
        <div class="header">
            
            <h1 class="page-title">管理员列表</h1>
        </div>
        
             

        <div class="container-fluid">
            <div class="row-fluid">
                    
<div class="btn-toolbar">
    <a href="javascript:;" onclick="append('新增管理员','{:U(\'Admin/Manager/append\')}','800','400')"><button class="btn btn-primary"><i class="icon-plus"></i>新增管理员</button></a>
   
  <div class="btn-group">
  </div>
</div>
<div class="well">
    <table class="table">
      <thead>
        <tr>
          
          <th>昵称</th>
          <th>管理员角色</th>
          <th>性别</th>
          <th>手机号码</th>
          <th>状态</th>
          <th>管理</th>
          <th style="width: 26px;"></th>
        </tr>
      </thead>
      <tbody>

        <volist name='list' id='vo'>
        <tr>
          
          <td>{$vo.nickname}</td>
          <td>
            <volist name="mage_role" id='role'>
              <if condition="$vo['id'] eq $role['id']">{$role.role_name} |` </if>
            </volist>
          </td>
          <td><if condition = "$vo.gender eq 0">男<else />女</if></td>
          <td>{$vo.phone}</td>
          <if condition='$vo.status eq 1'>
            <td><span style="background-color: green;color:white;border-radius:10px;padding-left: 10px;padding-right: 10px">正常</span></td>
          <else/>
            <td><span style="background-color: red;color:white;border-radius:10px;padding-left: 10px;padding-right: 10px">冻结</span></td>
          </if>
          <td>
              <a href="javascript:;" onclick="edit('权限角色编辑','{:U(\'Admin/Manager/edit_role\',array(\'id\'=>$vo[\'id\']))}','{$vo.id}','400','300')"><button class="btn btn-primary"><i class="icon-plus"></i></button></a>
              <a href="javascript:;" onclick="edit('管理员修改','{:U(\'Admin/Manager/edit\',array(\'id\'=>$vo[\'id\']))}','{$vo.id}','800','400')"><button class="btn btn-primary"><i class="icon-pencil"></i></button></a>
              <a href="javascript:;"  onclick="del_mana('{:U(\'Admin/Manager/del\',array(\'id\'=>$vo[\'id\']))}')" role="button" data-toggle="modal"><button class="btn btn-primary"><i class="icon-remove"></i></button></a>
          </td>

        </tr>
        </volist>
      </tbody>
    </table>
</div>
<div class="pagination">
    <ul>
        {$page}
    </ul>
</div>

<script type="text/javascript">
   function append(title,url,w,h){
      layer_show(title,url,w,h);
   }
   function edit(title,url,id,w,h){
      layer_show(title,url,w,h);
   }

   function del_mana(url){

      layer.confirm('确定要删除吗',function(index){
        $.ajax({
          type:'POST',
          url: url ,
          dataType:'json',
          success: function(data){
            if(data.code==1){
              layer.msg(data.info,{icon:1,time:1000});
              location.href = "{:U('showlist')}";
            }else{
              layer.msg(data.info,{icon:2,time:1000});
              return false;
            }
            
          },
          error:function(data){
            
          }

        })
      });
   }
</script>

                